package com.zjitc.dao;

import com.zjitc.model.Cart;
import com.zjitc.model.Cat;
import com.zjitc.model.User;

import java.util.List;

import org.apache.ibatis.annotations.Param;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/23 15:22
 * @description:
 */
public interface ManageDao {

  List<User> findAllUser();

  List<Cat> findAllCat();

  void deleteUser(Integer id);

  void deleteCat(Integer id);

  void updateUser();

  void updateCat();

  User insertUser();

  Cat insertCat();

  List<Cat> findCatByCatSpecies(String catSpecies);

  User manageLogin(@Param("username") String username, @Param("password") String password);

  int checkUser(String username);

  User checkByUsernameAndPassword(@Param("username") String username);

  User findUserInfo(@Param("username") String username);

  void editManage(@Param("username") String username, @Param("email") String email,
      @Param("phone") String phone);

  User checkOldPwd(@Param("password") String password);

  void changePwd(@Param("password") String newPassword, @Param("username") String username);

  Cat findCatById(@Param("id") Integer id);

  void editCat(@Param("catName") String catName, @Param("sex") String sex,
      @Param("catSpecies") String catSpecies, @Param("image") String image, @Param("id") int id);

  List<Cart> findAllcartOrder();

  String findUserById(Integer id);

  int checkOrderState(String username);

  void changeState(String uuid);
}
